package com.lee.lxl.idcard;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.lee.lxl.idcard.activity.IDcardActivity;
import com.lee.lxl.idcard.activity.PhoneActivity;
import com.lee.lxl.idcard.activity.WebscanActivity;
import com.zhy.autolayout.AutoLayoutActivity;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class MainActivity extends AutoLayoutActivity {

    @Bind(R.id.bt_idcard)
    Button btIdcard;
    @Bind(R.id.bt_phonenumber)
    Button btPhonenumber;
    @Bind(R.id.bt_web)
    Button btWeb;

    private Intent intent;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ButterKnife.bind(this);
    }


    @OnClick({R.id.bt_idcard, R.id.bt_phonenumber, R.id.bt_web})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.bt_idcard:
                intent = new Intent(this, IDcardActivity.class);
                startActivity(intent);
                break;
            case R.id.bt_phonenumber:
                intent = new Intent(this, PhoneActivity.class);
                startActivity(intent);
                break;
            case R.id.bt_web:
                intent = new Intent(this, WebscanActivity.class);
                startActivity(intent);
                break;
        }
    }

}
